-
-
Notifications
You must be signed in to change notification settings - Fork 980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LibWeb+LibGfx: Use GPU backend for <canvas> #1532
LibWeb+LibGfx: Use GPU backend for <canvas> #1532
Conversation
93227f6
to
ae5603a
Compare
6c813fc
to
f52f8b6
Compare
This is required to share GPU context creation code between display list player, which resides in LibWeb, and PainterSkia, which handles <canvas> painting.
Adds a new class in LibGfx that represents GPU-accelerated surface and will be used for both <canvas> and page rendering (display list player).
Since the Metal context is currently only used by LibGfx, it could be moved there to avoid having Metal as a dependency for everything that uses LibCore.
6e69e1a
to
1f7906f
Compare
I rebased the branch, but linux CI fails with following error I can't reproduce locally on my linux computer. @ADKaster any chance you know what's going on here? could this be related to CI caches?
|
@kalenikaliaksandr Looks like you git add'd the removal of VulkanContext.cpp from one lib, but forgot to add it in the new location. LibGfx/VulkanContext.cpp needs git add'd to the PR |
1f7906f
to
7b7d8f4
Compare
oops, indeed! |
Since the Vulkan context is currently only used by LibGfx, it could be moved there to avoid having Vulkan as a dependency for everything that uses LibCore.
This is implemented by using a GPU-accelerated surface for <canvas> when a GPU context is available. A side effect of this change is that all canvas modifications have to be performed through Gfx::Painter, and whenever its content has to be accessed, we need to take a snapshot of the corresponding GPU surface. A new DrawPaintingSurface display list command is introduced to allow cheap blitting of canvas content without having to read GPU surface content into RAM.
7b7d8f4
to
e6cfa9c
Compare
This is implemented by using a GPU-accelerated surface for when
a GPU context is available.
A side effect of this change is that all canvas modifications have to be
performed through Gfx::Painter, and whenever its content has to be
accessed, we need to take a snapshot of the corresponding GPU surface.
A new DrawPaintingSurface display list command is introduced to allow
cheap blitting of canvas content without having to read GPU surface
content into RAM.This is a fix to the vcpkg package itself to fix some exported symbols.
This change depends on #1528 so I am marking it as a draft until it's merged.